<?php 
define('RUN_KATANA', true);
require('../../includes/config.php');
$orderid   = intval($_REQUEST['orderId']);
$transact  = intval($_REQUEST['transaction']);
if(intval($_REQUEST['orderId']) == 0)
{ $orderid   = intval($_REQUEST['orderid']); }
if(intval($_REQUEST['transaction']) == 0)
{ $transact  = intval($_REQUEST['transact']); }
$com	   = 16;
if(intval($_REQUEST['c']) > 0)
{ $com = intval($_REQUEST['c']); }

$AcceptURL = SITE_URL.'?c='.$com.'&action=payment_callback&orderid='.$orderid.'&transact='.$transact;
if($_REQUEST['edit'] != '')
{ $AcceptURL .=  '&edit='.$_REQUEST['edit']; }

$output = file_get_contents($AcceptURL);

if(($orderid > 0) && ($transact > 0))
{ header('Location: '.$AcceptURL); }
else
{
	if($orderid > 0)
	{ 
		$AcceptURL = SITE_URL.'?c='.$com.'&action=payment&orderid='.$orderid; 
		header('Location: '.$AcceptURL); 
	}
	else
	{ header('Location: '.SITE_URL); } 
}
?>